//
//  MyPublicModel.m
//  PropertyMananger
//
//  Created by bh on 17/2/9.
//  Copyright © 2017年 BH. All rights reserved.
//

#import "MyPublicModel.h"

@implementation MyPhotoModel

@end

@implementation MyRWorkerModel

@end

@implementation MyPublicModel
- (NSMutableArray *)photoModeArray{
    
    if (!_photoModeArray) {
        
        _photoModeArray = [[NSMutableArray alloc]init];
    }
    return _photoModeArray;
}
- (NSMutableArray *)rWorkerModeArray{
    
    if (!_rWorkerModeArray) {
        
        _rWorkerModeArray = [[NSMutableArray alloc]init];
        
    }
    return _rWorkerModeArray;
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    if ([key isEqualToString:@"PhotoMode"]) {
        
        for (NSDictionary * dict in value) {
            
            MyPhotoModel * photoModel = [[MyPhotoModel alloc]init];
            [photoModel setValuesForKeysWithDictionary:dict];
            
            [self.photoModeArray addObject:photoModel];
            
        }
    }else if ([key isEqualToString:@"RWorkerMode"]){
        
        for (NSDictionary * dict in value) {
       
            MyRWorkerModel * rworkModel = [[MyRWorkerModel alloc]init];
            [rworkModel setValuesForKeysWithDictionary:dict];
            
            [self.rWorkerModeArray addObject:rworkModel];
            
        }
        
    }
    
}

@end
